<?php
class SessionAction extends HomeAction{
    //新闻列表
    public function show(){
		$rs=D("Home.News");
		$arr=$rs->where('news_del=0 and news_id='.$vid)->find();
		$this->display('session_hijack_show');
    }
    public function nb(){
		$rs=D("Home.News");
		$arr=$rs->where('news_del=0 and news_id='.$vid)->find();
		$this->display('session_nb_show');
    }
    public function vaccount(){
		$rs=D("Home.News");
		$arr=$rs->where('news_del=0 and news_id='.$vid)->find();
		$this->display('session_account_show');
    }
    public function jack_jsondata(){
		$rs=D("cookie");
		$arr=$rs->where('taskid=1')->group('mac')->select();
		
		$retArr = null;
		foreach($arr as $i=>$var){
			$array=$rs->where('mac=\''.$var[mac].'\' and taskid=1')->select();
			$retArr[$i] = $var;
			$retArr[$i]['children'] = $array;
		}

		echo json_encode($retArr);
		return;
	}
    public function nb_jsondata(){
		$rs=D("cookie");
		$arr=$rs->where('taskid=1')->group('mac')->select();
		
		$retArr = null;
		foreach($arr as $i=>$var){
			$array=$rs->where('mac=\''.$var[mac].'\' and taskid=1')->select();
			$retArr[$i] = $var;
			$retArr[$i]['children'] = $array;
		}

		echo json_encode($retArr);
		return;
	}
    public function account_jsondata(){
		$rs=D("cookie");
		$arr=$rs->where('taskid=1')->group('mac')->select();
		
		$retArr = null;
		foreach($arr as $i=>$var){
			$array=$rs->where('mac=\''.$var[mac].'\' and taskid=1')->select();
			$retArr[$i] = $var;
			$retArr[$i]['children'] = $array;
		}

		echo json_encode($retArr);
		return;
	}
}
?>